﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using TrainingWorkshop.Model;
using TrainingWorkshop.DALFactory;
using TrainingWorkshop.IDAL;
using TrainingWorkshop.DAL_EF;

//using TrainingWorkshop.DAL_EF;

namespace BLL
{
    /// <summary>
    /// Author: Sissi Zeng
    /// Date: 2012-08-08 16:30 
    /// get LevelList from Factory
    /// return to UI
    /// </summary>
    public class LevelList
    {


        /// <summary>
        /// Constructor
        /// </summary>
        public LevelList() { }




        /// <summary>
        /// get LevelList from factory
        /// </summary>
        /// <returns></returns>
        public List<TrainingWorkshop.Model.Level> GetLevels()
        {

            IFactory factory = new ApplicationContext().CreateFactory("EF");
    
            ILevelRepository levelRep = factory.CreateLevelRepository();
           
            return levelRep.SelectAll();
        }

    }
}
